<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="header.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Edit Product</title>
</head>
<body>
<script>
	$(document).ready(function(){
	    $("table tbody tr:even").addClass("tdbgcolor1"); 
	    $("table tbody tr:odd").addClass("tdbgcolor2"); 
	});
	function checkAndSubmit(){
		var form = document.getElementById("updateProductTypeForm");
		form.submit();
	}
	function showUploadWindow(){
		var InfoW=620;
		var InfoH=400;
		var InfoUrl="edit/insert_images.action?uploadFolder=<%=com.windfone.common.Constant.UPLOAD_PRODUCT_TYPE %>";
		var str=window.showModalDialog(InfoUrl,"","dialogWidth="+InfoW+"px;dialogHeight="+InfoH+"px;center=yes;help=no;resizable=no;status=no;scroll=no");
		if ( str != undefined){
			$("#imagepath").val(str);
			$("#imagepath1").attr("src","<%=contextPath%>/"+str);
		}	
	}	
</script>
<form method="post" action="updateProductType.action" id="updateProductTypeForm">
<div align="center">编辑手机类型</div>
<table width="80%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF" align="center">
	<tr>
		<td >手机类型名称:</td>
		<td ><input type="text" name="typeName" id="typeName"  value="<s:property value='bean.typeName'/>"  size="50" maxlength="50"/></td>
	</tr>
	<tr>
		<td >手机类型名称(英语):</td>
		<td ><input type="text" name="typenameEnglish" id="typenameEnglish"  value="<s:property value='bean.typenameEnglish'/>" size="50" maxlength="50"/></td>
	</tr>
	<tr>
		<td >语言:</td>
		<td ><select name="langId" id="langId">
			<option value="0" <s:if test='bean.langId==0'>selected</s:if> >简体</option>
			<option value="1" <s:if test='bean.langId==1'>selected</s:if> >繁体</option>
			<option value="2" <s:if test='bean.langId==2'>selected</s:if> >英语</option>
		</select></td>
	</tr>
	<tr>
		<td >手机图片:</td>
	  	<td  nowrap="nowrap">
				<img src="<%=contextPath%>/<s:property value='bean.imagepath'/>"  id="imagepath1" name="imagepath1"  border="0"/> &nbsp; <input type="button" value="照片"  onClick="showUploadWindow()"/>
		</td>
	</tr>		
	<tr>
		<td colspan="2">
			<input type="hidden" name="imagepath" id="imagepath" value="<s:property value='bean.imagepath'/>"/>
			<inut type="hidden" id="productTypeId" name="productTypeId"  value="<s:property value='bean.id'/>" />
			<input type="button" value="Save"  onclick="checkAndSubmit()"/>&nbsp;
			<input	type="button" value="reset" />&nbsp;
			<input	type="button" value="返回"  onclick="javascript:window.history.back();" />
		</td>
</table>
</form>
</body>
</html>
